package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.User;

import java.util.Map;
import com.itheima.pojo.Menu;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
    public User findByUsername(String username);

    /**
     * 检查项分页查询
     * @param username
     * @return
     */
     Page<User> findByCondition(String username);

    Page<User> findAll();

    public void add(User user);

    public void setUserAndRole(Map<String, Integer> map);

    public User findById(Integer id);

    public void edit(User user);

    public void deleteAssociation(Integer userId);
    List<Menu> findMenu(String username);

    List<Integer> findMenuID(String username);

    List<Menu> findchildren(@Param("id") Integer id, @Param("username") String username);

    List<Menu> findchildren1(@Param("parentMenuId") Integer id,@Param("menuIDs") List<Integer> menuIDs);
}
